/**
 * 
 */
package com.net.web.controllers;

import javax.servlet.ServletException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

import com.net.domain.Staff;
import com.net.service.StaffService;

/**
 * @author Dinesh
 *
 */
public class StaffUpdateController extends SimpleFormController {
private StaffService StaffService;
	
	@Override
	protected ModelAndView onSubmit(Object command) throws ServletException {
		ModelAndView mav = new ModelAndView(getSuccessView());
		
		Staff Staff = (Staff)command;
		
		StaffService.updateStaffInfo(Staff);
		
		return mav;		
	}

	public StaffService getStaffService() {
		return StaffService;
	}

	@Autowired
	public void setStaffService(StaffService StaffService) {
		this.StaffService = StaffService;
	}

}
